package com.sluggard.security.manage.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sluggard.mp.model.entity.IdEntity;
import com.sluggard.mp.model.entity.StandardAuditEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 角色xinxi
 * </p>
 *
 * @author lizheng
 * @since 2024-04-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_role")
@Schema(name = "RoleEntity", description = "角色信息")
public class RoleEntity extends StandardAuditEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "类型{1:超级管理员,2:普通管理员}")
    @TableField("type")
    private Integer type;

    @Schema(description = "角色编码")
    @TableField("code")
    private String code;

    @Schema(description = "名称")
    @TableField("name")
    private String name;

    @Schema(description = "描述")
    @TableField("descn")
    private String descn;

    @Schema(description = "权限集合")
    @TableField(value = "权限id", exist = false)
    private List<String> permissionIds;

}
